package edu.suda.xsap.dto.convert;
import edu.suda.xsap.dto.MemCardDto;
import edu.suda.xsap.entity.MemCard;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;


@Mapper(componentModel = "spring")
public interface MemCardConvert {
    @Mapping(source="id", target = "id")
    @Mapping(source="name", target = "memberCardName")
    @Mapping(source="price", target = "price")
    @Mapping(source="note", target = "note")
    @Mapping(source="type", target = "type" )
    @Mapping(source="totalcount", target = "availableTimes")
    @Mapping(source="totalday", target = "availableDays")
    MemCardDto toDto(MemCard memCard);

    List<MemCardDto> toDtoList(List<MemCard> memCards);
}


